1. Field of the Invention
The present invention relates to a microprocessor which can be incorporated in an ICE (in-circuit emulator) for use, and more particularly to improvement to reduce a size of the device having a memory for normal operation and a memory for debugging provided therein.
2. Description of the Background Art
It is said that an enhancement in efficiency of development of software is an important problem in a system using a microprocessor. For this purpose, a technique for performing debugging by using an ICE has been known well. In the conventional ICE, a memory for debugging (a so-called "trace memory") and a ROM for a monitor program (a program for executing a trace and the like) are provided on an outside of a microprocessor, and these circuits are mounted on a circuit board of the ICE. For this reason, there has been a problem that mounting cost of the ICE is high.
In order to improve this problem, it has been proposed that the memory for debugging is built in the microprocessor. FIG. 14 is a block diagram showing an example. As shown in FIG. 14, a microprocessor 150 is connected to a host system 161 and a control unit 162 so that an ICE 160 can be formed. The microprocessor 150 is built as an integrated circuit in a single semiconductor chip.
The microprocessor 150 comprises a CPU (central processing unit) 151. The CPU 151 operates on the basis of a control signal sent from the control unit 162 through a control signal line 165. A data signal is received and sent through a data signal line 154, a buffer 153 and a data signal line 164 between the CPU 151 and the control unit 162. The control unit 162 exchanges a control signal together with the host system 161 through a signal line 163.
The microprocessor 150 further comprises a memory 152 for debugging. The memory 152 is formed as a SRAM, and is addressed by an address signal sent from the CPU 151 through a signal line 155.
In the conventional microprocessor 150, however, a trace memory is formed by the SRAM. For this reason, there has been a problem that an occupied area of the memory of the microprocessor 150 on the semiconductor chip is great and cost of the semiconductor chip is high.